<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class AddFeeToPayStreamTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('pay_stream', function (Blueprint $table) {
            $table->unsignedInteger('fee')->default(0)->comment('手续费')->default(0);
            $table->float('feeRate', 8, 6)->default(0)->comment('费率')->default(0);
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('pay_stream', function (Blueprint $table) {
            $table->dropColumn('fee');
            $table->dropColumn('feeRate');
        });
    }
}
